package com.server.common.logistics.dsf;

import com.google.gson.annotations.SerializedName;
import com.server.common.logistics.dsf.get.DSFGetOrderResponse;
import com.server.common.logistics.response.LogisticsResponse;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.util.ObjectUtils;

import java.util.List;

@NoArgsConstructor
@Getter
@Setter
public class DSFOrderResponse<T> extends LogisticsResponse {

    @SerializedName("data")
    private T data;
    @SerializedName("msg")
    private String msg;
    @SerializedName("result")
    private String result;


    @Override
    public Boolean responseOk() {
        return "1".equals(result);
    }

    @Override
    public Boolean dataEmpty() {
        return ObjectUtils.isEmpty(data);
    }

}
